home *** CD-ROM | disk | FTP | other *** search
/ Chip 2001 June / CHIP Haziran 2001.iso / prog / share / 04 / setup.exe / MM6.Cab / F4204_CSScriptLib.js.F6A680DD_F3FB_4CF3_BABB_0D0F06E630F5 < prev    next >
Text File  |  2000-07-26  |  2KB  |  71 lines

  1. // -- Adobe GoLive JavaScript Library// -- Global Functionsfunction CSScriptInit() {if(typeof(skipPage) != "undefined") { if(skipPage) return; }
  2. idxArray = new Array;
  3. for(var i=0;i<CSInit.length;i++)
  4.     idxArray[i] = i;
  5. CSAction2(CSInit, idxArray);
  6. }CSInit = new Array;
  7. CSExit = new Array;
  8. CSStopExecution = false;
  9. function CSAction(array) { 
  10.     return CSAction2(CSAct, array);
  11. }
  12. function CSAction2(fct, array) { 
  13.     var result;
  14.     for (var i=0;i<array.length;i++) {
  15.         if(CSStopExecution) return false; 
  16.         var actArray = fct[array[i]];
  17.         if(actArray == null) return false; 
  18.         var tempArray = new Array;
  19.         for(var j=1;j<actArray.length;j++) {
  20.             if((actArray[j] != null) && (typeof(actArray[j]) == "object") && (actArray[j].length == 2)) {
  21.                 if(actArray[j][0] == "VAR") {
  22.                     tempArray[j] = CSStateArray[actArray[j][1]];
  23.                 }
  24.                 else {
  25.                     if(actArray[j][0] == "ACT") {
  26.                         tempArray[j] = CSAction(new Array(new String(actArray[j][1])));
  27.                     }
  28.                 else
  29.                     tempArray[j] = actArray[j];
  30.                 }
  31.             }
  32.             else
  33.                 tempArray[j] = actArray[j];
  34.         }            
  35.         result = actArray[0](tempArray);
  36.     }
  37.     return result;
  38. }
  39. CSAct = new Object;
  40. function CSClickReturn () {
  41.     var bAgent = window.navigator.userAgent; 
  42.     var bAppName = window.navigator.appName;
  43.     if ((bAppName.indexOf("Explorer") >= 0) && (bAgent.indexOf("Mozilla/3") >= 0) && (bAgent.indexOf("Mac") >= 0))
  44.         return true; // dont follow link
  45.     else return false; // dont follow link
  46. }
  47. // -- Action Functions
  48. function CSFixFct() {
  49.     var d = document; var w = window;
  50.     if (d.cs.csFix.w != w.innerWidth || d.cs.csFix.h != w.innerHeight) {
  51.         d.location = d.location; }
  52. }
  53. function CSNSFix(action) { 
  54.     var d = document; var w = window;
  55.     if ((navigator.appName == 'Netscape') && (parseInt(navigator.appVersion) == 4)) {
  56.         if (typeof d.cs == 'undefined') { 
  57.             d.cs = new Object;
  58.             d.cs.csFix = new Object; 
  59.         } else if (CSIsFrame (w) == true) CSFixFct();
  60.         d.cs.csFix.w = w.innerWidth;
  61.         d.cs.csFix.h = w.innerHeight; 
  62.         window.onresize = CSFixFct;
  63.       }
  64. }
  65. function CSIsFrame (window) {
  66.     var rootWindow = window.parent;
  67.     if (rootWindow == 'undefined') return false;
  68.     for (i = 0; i < rootWindow.frames.length; i++)
  69.         if (window == rootWindow.frames[i]) return true;
  70.     return false;
  71. }// EOF